package com.wjjm.spoonselling.dao;

import com.wjjm.spoonselling.pojo.Cart;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CartDao {


     @Insert("insert into cart values(#{orderId},#{customerId},#{name},#{commodityId},#{quantity},#{price},#{date})")
     Boolean insert(Cart cart);

     @Select("select * from cart where customerId=#{customerId}")
     List<Cart> selectByCustomer(int customerId);


}
